package com.efuture.jdbctemplate;

import com.efuture.druid.DruidUtils;
import org.springframework.jdbc.core.JdbcTemplate;

/**
 * @ClassNAME JdbcTemplateQuickStart
 * @Description JdbcTemplate快速入门
 * @Author zhaoshanshan
 * @Date 2021/9/20 9:20 下午
 * @Version 1.0
 */
public class JdbcTemplateQuickStart {

    public static void main(String[] args) {
        try{
            JdbcTemplate jdbcTemplate = new JdbcTemplate(DruidUtils.getDataSource());
            String sql = "update account set NAME = ? where id = ?";
            jdbcTemplate.update(sql,"lisi",2);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}